using System;
using System.Xml;
using System.Xml.Schema;
using System.Xml.Serialization;
using Oracle.ManagedDataAccess.Client;
using OracleInternal.Common;
using OracleInternal.Core;

namespace Oracle.ManagedDataAccess.Types
{
	[Serializable]
	[XmlSchemaProvider("GetXsdType")]
	public struct OracleDecimal : IComparable, INullable, IXmlSerializable
	{
		private byte[] m_byteRepresentation;

		private bool m_bPositive;

		private bool m_bZero;

		private string m_format;

		private bool m_bNotNull;

		private int m_numberType;

		internal const byte MaxArrSize = 22;

		internal const byte MinPrecision = 1;

		internal const int ScaleFactor = 3;

		internal const int NumberTypeIndex = 2;

		internal static readonly OracleDecimal PositiveInfinity = GetPosInfinity();

		internal static readonly OracleDecimal NegativeInfinity = GetNegInfinity();

		internal static readonly OracleDecimal NaN = GetNaN();

		public static readonly byte MaxPrecision = 38;

		public static readonly byte MaxScale = 127;

		public static readonly OracleDecimal MaxValue = GetMaxValue();

		public static readonly int MinScale = -84;

		public static readonly OracleDecimal MinValue = GetMinValue();

		public static readonly OracleDecimal NegativeOne = new OracleDecimal(-1);

		public static readonly OracleDecimal Null;

		public static readonly OracleDecimal One = new OracleDecimal(1);

		private static readonly decimal Pivalue = 3.1415926535897932384626433832m;

		public static readonly OracleDecimal Pi = SetPi();

		public static readonly OracleDecimal Zero = new OracleDecimal(0);

		public bool IsNull => !m_bNotNull;

		public byte[] BinData
		{
			get
			{
				byte[] array = new byte[22];
				array[0] = (byte)m_byteRepresentation.Length;
				Array.Copy(m_byteRepresentation, 0, array, 1, m_byteRepresentation.Length);
				return array;
			}
		}

		public bool IsInt
		{
			get
			{
				if (m_bNotNull)
				{
					return OracleNumberCore.IsInt(m_byteRepresentation);
				}
				throw new OracleNullValueException();
			}
		}

		public bool IsPositive
		{
			get
			{
				if (m_bNotNull)
				{
					return OracleNumberCore.IsPositive(m_byteRepresentation);
				}
				throw new OracleNullValueException();
			}
		}

		public bool IsZero
		{
			get
			{
				if (m_bNotNull)
				{
					return OracleNumberCore.IsZero(m_byteRepresentation);
				}
				throw new OracleNullValueException();
			}
		}

		internal bool IsInfinity
		{
			get
			{
				if (m_bNotNull)
				{
					return OracleNumberCore.IsInfinity(m_byteRepresentation);
				}
				throw new OracleNullValueException();
			}
		}

		internal bool IsPositiveInfinity
		{
			get
			{
				if (m_bNotNull)
				{
					return OracleNumberCore.IsPositiveInfinity(m_byteRepresentation);
				}
				throw new OracleNullValueException();
			}
		}

		internal bool IsNegativeInfinity
		{
			get
			{
				if (m_bNotNull)
				{
					return OracleNumberCore.IsNegativeInfinity(m_byteRepresentation);
				}
				throw new OracleNullValueException();
			}
		}

		public string Format
		{
			get
			{
				if (m_bNotNull)
				{
					return m_format;
				}
				throw new OracleNullValueException();
			}
			set
			{
				if (m_bNotNull)
				{
					m_format = value;
					return;
				}
				throw new OracleNullValueException();
			}
		}

		public decimal Value
		{
			get
			{
				if (this == Pi)
				{
					return Pivalue;
				}
				if (m_bNotNull)
				{
					return DecimalConv.GetDecimal(m_byteRepresentation, 0, m_byteRepresentation.Length);
				}
				throw new OracleNullValueException();
			}
		}

		internal byte[] InternalByteRepresentation => m_byteRepresentation;

		public OracleDecimal(byte[] numBytes)
			: this(numBytes, bContainsLength: true)
		{
		}

		public OracleDecimal(int intX)
			: this((long)intX)
		{
		}

		public OracleDecimal(long longX)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.ctor);
			}
			try
			{
				m_bNotNull = true;
				m_format = null;
				m_numberType = 1;
				m_bPositive = longX > 0;
				m_bZero = longX == 0;
				m_byteRepresentation = OracleNumberCore.lnxmin(longX);
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.ctor, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.ctor);
				}
			}
		}

		public OracleDecimal(float floatX)
			: this(double.Parse(floatX.ToString()))
		{
		}

		public OracleDecimal(double doubleX)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.ctor);
			}
			try
			{
				if (double.IsNaN(doubleX))
				{
					m_byteRepresentation = OracleNumberCore.NANREPD;
					m_bNotNull = true;
					m_numberType = 5;
					m_bPositive = true;
					m_bZero = false;
					m_format = null;
				}
				else if (double.IsPositiveInfinity(doubleX))
				{
					m_byteRepresentation = OracleNumberCore.GetPositiveInfinityByteRep();
					m_bNotNull = true;
					m_numberType = 3;
					m_bPositive = true;
					m_bZero = false;
					m_format = null;
				}
				else if (double.IsNegativeInfinity(doubleX))
				{
					m_byteRepresentation = OracleNumberCore.GetNegativeInfinityByteRep();
					m_bNotNull = true;
					m_numberType = 4;
					m_bPositive = false;
					m_bZero = false;
					m_format = null;
				}
				else if (doubleX == 0.0)
				{
					m_byteRepresentation = OracleNumberCore.GetZeroByteRep();
					m_bNotNull = true;
					m_numberType = 1;
					m_bPositive = false;
					m_bZero = true;
					m_format = null;
				}
				else
				{
					m_bNotNull = true;
					m_numberType = 2;
					m_bPositive = doubleX > 0.0;
					m_bZero = false;
					m_format = null;
					m_byteRepresentation = OracleNumberCore.lnxren(doubleX);
				}
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.ctor, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.ctor);
				}
			}
		}

		public OracleDecimal(decimal decimalX)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.ctor);
			}
			try
			{
				byte[] bytes = null;
				DecimalConv.GetBytes(decimalX, out bytes);
				m_byteRepresentation = new byte[bytes[0]];
				Array.Copy(bytes, 1, m_byteRepresentation, 0, bytes[0]);
				if (BitConverter.GetBytes(decimal.GetBits(decimalX)[3])[2] == 0)
				{
					m_numberType = 1;
				}
				else
				{
					m_numberType = 2;
				}
				if (decimalX > 0m)
				{
					m_bPositive = true;
				}
				else
				{
					m_bPositive = false;
				}
				if (decimalX == 0m)
				{
					m_bZero = true;
				}
				else
				{
					m_bZero = false;
				}
				m_bNotNull = true;
				m_format = null;
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.ctor, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.ctor);
				}
			}
		}

		public OracleDecimal(string numStr)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.ctor);
			}
			try
			{
				if (numStr == null)
				{
					throw new ArgumentNullException("numStr");
				}
				if (numStr == "")
				{
					throw new FormatException();
				}
				ToBytes(numStr, out m_byteRepresentation, out m_numberType, out m_bPositive, out m_bZero);
				m_bNotNull = true;
				m_format = null;
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.ctor, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.ctor);
				}
			}
		}

		internal OracleDecimal(byte[] numBytes, bool bContainsLength)
		{
			if (ProviderConfig.m_bTraceLevelPrivate)
			{
				Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Entry, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.ctor);
			}
			try
			{
				int num = 0;
				if (numBytes == null)
				{
					throw new ArgumentNullException();
				}
				if (bContainsLength && numBytes.Length != 22)
				{
					throw new ArgumentException();
				}
				if (bContainsLength)
				{
					num = numBytes[0];
					m_byteRepresentation = new byte[num];
					Array.Copy(numBytes, 1, m_byteRepresentation, 0, num);
				}
				else
				{
					num = numBytes.Length;
					if (num == 22 && numBytes[num - 1] == 102)
					{
						num--;
						m_byteRepresentation = new byte[num];
						Array.Copy(numBytes, 0, m_byteRepresentation, 0, num);
					}
					else
					{
						m_byteRepresentation = numBytes;
					}
				}
				if (!OracleNumberCore.isValid(m_byteRepresentation))
				{
					m_byteRepresentation = null;
					throw new ArgumentException();
				}
				if (OracleNumberCore.IsPositive(m_byteRepresentation))
				{
					m_bPositive = true;
				}
				else
				{
					m_bPositive = false;
				}
				if (OracleNumberCore.IsNaN(m_byteRepresentation))
				{
					m_numberType = 5;
				}
				else if (OracleNumberCore.IsInt(m_byteRepresentation))
				{
					m_numberType = 1;
				}
				else if (OracleNumberCore.IsPositiveInfinity(m_byteRepresentation))
				{
					m_numberType = 3;
				}
				else if (OracleNumberCore.IsNegativeInfinity(m_byteRepresentation))
				{
					m_numberType = 4;
				}
				else
				{
					m_numberType = 2;
				}
				if (OracleNumberCore.IsZero(m_byteRepresentation))
				{
					m_bZero = true;
				}
				else
				{
					m_bZero = false;
				}
				m_bNotNull = true;
				m_format = null;
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Private, OracleTraceTag.Error, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.ctor, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPrivate)
				{
					Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Exit, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.ctor);
				}
			}
		}

		public static XmlQualifiedName GetXsdType(XmlSchemaSet schemaSet)
		{
			return new XmlQualifiedName("decimal", "http://www.w3.org/2001/XMLSchema");
		}

		XmlSchema IXmlSerializable.GetSchema()
		{
			return null;
		}

		void IXmlSerializable.ReadXml(XmlReader reader)
		{
			string attribute = reader.GetAttribute("null", "http://www.w3.org/2001/XMLSchema-instance");
			if (attribute == null || !XmlConvert.ToBoolean(attribute))
			{
				attribute = reader.ReadElementString();
				ToBytes(attribute, out m_byteRepresentation, out m_numberType, out m_bPositive, out m_bZero);
				m_bNotNull = true;
			}
			else
			{
				m_bNotNull = false;
			}
		}

		void IXmlSerializable.WriteXml(XmlWriter writer)
		{
			if (m_bNotNull)
			{
				writer.WriteString(ToString());
			}
			else
			{
				writer.WriteAttributeString("xsi", "null", "http://www.w3.org/2001/XMLSchema-instance", "true");
			}
		}

		public static bool Equals(OracleDecimal value1, OracleDecimal value2)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Equals);
			}
			try
			{
				return InternalTypes.CompareNull(!value1.m_bNotNull, !value2.m_bNotNull) switch
				{
					CompareNullEnum.BothNull => true, 
					CompareNullEnum.BothNotNull => Compare(value1, value2) == 0, 
					_ => false, 
				};
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Equals, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Equals);
				}
			}
		}

		public static bool GreaterThan(OracleDecimal value1, OracleDecimal value2)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.GreaterThan);
			}
			try
			{
				if (value1.m_numberType != 5 && value2.m_numberType != 5)
				{
					return Compare(value1, value2) > 0;
				}
				if (value1.m_numberType == 5 && value2.m_numberType != 5)
				{
					return true;
				}
				return false;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.GreaterThan);
				}
			}
		}

		public static bool GreaterThanOrEqual(OracleDecimal value1, OracleDecimal value2)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.GreaterThanOrEqual);
			}
			try
			{
				if (value1.m_numberType != 5 && value2.m_numberType != 5)
				{
					return Compare(value1, value2) >= 0;
				}
				if (value1.m_numberType != 5 && value2.m_numberType == 5)
				{
					return false;
				}
				return true;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.GreaterThanOrEqual);
				}
			}
		}

		public static bool LessThan(OracleDecimal value1, OracleDecimal value2)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.LessThan);
			}
			try
			{
				if (value1.m_numberType != 5 && value2.m_numberType != 5)
				{
					return Compare(value1, value2) < 0;
				}
				if (value1.m_numberType != 5 && value2.m_numberType == 5)
				{
					return true;
				}
				return false;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.LessThan);
				}
			}
		}

		public static bool LessThanOrEqual(OracleDecimal value1, OracleDecimal value2)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.LessThanOrEqual);
			}
			try
			{
				if (value1.m_numberType != 5 && value2.m_numberType != 5)
				{
					return Compare(value1, value2) <= 0;
				}
				if (value1.m_numberType == 5 && value2.m_numberType != 5)
				{
					return false;
				}
				return true;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.LessThanOrEqual);
				}
			}
		}

		public static bool NotEquals(OracleDecimal value1, OracleDecimal value2)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.NotEquals);
			}
			try
			{
				return Compare(value1, value2) != 0;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.NotEquals);
				}
			}
		}

		public static OracleDecimal Max(OracleDecimal value1, OracleDecimal value2)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Max);
			}
			try
			{
				if (value1.m_numberType != 5 && value2.m_numberType != 5)
				{
					return (Compare(value1, value2) >= 0) ? value1 : value2;
				}
				return NaN;
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Max, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Max);
				}
			}
		}

		public static OracleDecimal Min(OracleDecimal value1, OracleDecimal value2)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Min);
			}
			try
			{
				if (value1.m_numberType != 5 && value2.m_numberType != 5)
				{
					return (Compare(value1, value2) <= 0) ? value1 : value2;
				}
				if (value1.m_numberType == 5)
				{
					return value2;
				}
				return value1;
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Min, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Min);
				}
			}
		}

		public static bool operator ==(OracleDecimal value1, OracleDecimal value2)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.OperatorEqualTo);
			}
			try
			{
				return Compare(value1, value2) == 0;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.OperatorEqualTo);
				}
			}
		}

		public static bool operator >(OracleDecimal value1, OracleDecimal value2)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.OperatorGreaterThan);
			}
			try
			{
				if (value1.m_numberType != 5 && value2.m_numberType != 5)
				{
					return Compare(value1, value2) > 0;
				}
				if (value1.m_numberType == 5 && value2.m_numberType != 5)
				{
					return true;
				}
				return false;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.OperatorGreaterThan);
				}
			}
		}

		public static bool operator >=(OracleDecimal value1, OracleDecimal value2)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.OperatorGreaterThanOrEqualTo);
			}
			try
			{
				if (value1.m_numberType != 5 && value2.m_numberType != 5)
				{
					return Compare(value1, value2) >= 0;
				}
				if (value1.m_numberType != 5 && value2.m_numberType == 5)
				{
					return false;
				}
				return true;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.OperatorGreaterThanOrEqualTo);
				}
			}
		}

		public static bool operator <(OracleDecimal value1, OracleDecimal value2)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.OperatorLessThan);
			}
			try
			{
				if (value1.m_numberType != 5 && value2.m_numberType != 5)
				{
					return Compare(value1, value2) < 0;
				}
				if (value1.m_numberType != 5 && value2.m_numberType == 5)
				{
					return true;
				}
				return false;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.OperatorLessThan);
				}
			}
		}

		public static bool operator <=(OracleDecimal value1, OracleDecimal value2)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.OperatorLessThanOrEqualTo);
			}
			try
			{
				if (value1.m_numberType != 5 && value2.m_numberType != 5)
				{
					return Compare(value1, value2) <= 0;
				}
				if (value1.m_numberType == 5 && value2.m_numberType != 5)
				{
					return false;
				}
				return true;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.OperatorLessThanOrEqualTo);
				}
			}
		}

		public static bool operator !=(OracleDecimal value1, OracleDecimal value2)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.OperatorNotEqualTo);
			}
			try
			{
				return Compare(value1, value2) != 0;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.OperatorNotEqualTo);
				}
			}
		}

		public static OracleDecimal operator +(OracleDecimal value1, OracleDecimal value2)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.OperatorPlus);
			}
			try
			{
				return Add(value1, value2);
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.OperatorPlus, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.OperatorPlus);
				}
			}
		}

		public static OracleDecimal operator -(OracleDecimal value1, OracleDecimal value2)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.OperatorMinus);
			}
			try
			{
				return Subtract(value1, value2);
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.OperatorMinus, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.OperatorMinus);
				}
			}
		}

		public static OracleDecimal operator -(OracleDecimal value1)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.OperatorMinus);
			}
			try
			{
				return Negate(value1);
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.OperatorMinus, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.OperatorMinus);
				}
			}
		}

		public static OracleDecimal operator *(OracleDecimal value1, OracleDecimal value2)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.OperatorMultiply);
			}
			try
			{
				return Multiply(value1, value2);
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.OperatorMultiply, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.OperatorMultiply);
				}
			}
		}

		public static OracleDecimal operator /(OracleDecimal value1, OracleDecimal value2)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.OperatorDivide);
			}
			try
			{
				return Divide(value1, value2);
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.OperatorDivide, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.OperatorDivide);
				}
			}
		}

		public static OracleDecimal operator %(OracleDecimal value1, OracleDecimal value2)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.OperatorPercent);
			}
			try
			{
				return Mod(value1, value2);
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.OperatorPercent, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.OperatorPercent);
				}
			}
		}

		public static explicit operator OracleDecimal(string numStr)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.ctor);
			}
			try
			{
				return new OracleDecimal(numStr);
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.ctor, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.ctor);
				}
			}
		}

		public static explicit operator byte(OracleDecimal value1)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.OperatorByte);
			}
			try
			{
				if (value1.m_bNotNull)
				{
					if (value1.m_numberType != 5 && value1.m_numberType != 4 && value1.m_numberType != 3)
					{
						return Convert.ToByte(OracleNumberCore.lnxsni(value1.m_byteRepresentation));
					}
					throw new OverflowException();
				}
				throw new OracleNullValueException();
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.OperatorByte, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.OperatorByte);
				}
			}
		}

		public static explicit operator short(OracleDecimal value1)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.OperatorShort);
			}
			try
			{
				if (value1.m_bNotNull)
				{
					if (value1.m_numberType != 5 && value1.m_numberType != 4 && value1.m_numberType != 3)
					{
						return Convert.ToInt16(OracleNumberCore.lnxsni(value1.m_byteRepresentation));
					}
					throw new OverflowException();
				}
				throw new OracleNullValueException();
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.OperatorShort, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.OperatorShort);
				}
			}
		}

		public static explicit operator int(OracleDecimal value1)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.OperatorInt);
			}
			try
			{
				if (value1.m_bNotNull)
				{
					if (value1.m_numberType != 5 && value1.m_numberType != 4 && value1.m_numberType != 3)
					{
						return Convert.ToInt32(OracleNumberCore.lnxsni(value1.m_byteRepresentation));
					}
					throw new OverflowException();
				}
				throw new OracleNullValueException();
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.OperatorInt, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.OperatorInt);
				}
			}
		}

		public static explicit operator long(OracleDecimal value1)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.OperatorLong);
			}
			try
			{
				if (value1.m_bNotNull)
				{
					if (value1.m_numberType != 5 && value1.m_numberType != 4 && value1.m_numberType != 3)
					{
						return OracleNumberCore.lnxsni(value1.m_byteRepresentation);
					}
					throw new OverflowException();
				}
				throw new OracleNullValueException();
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.OperatorLong, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.OperatorLong);
				}
			}
		}

		public static explicit operator float(OracleDecimal value1)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.OperatorFloat);
			}
			try
			{
				if (value1.m_bNotNull)
				{
					return Convert.ToSingle(OracleNumberCore.lnxnur(value1.m_byteRepresentation));
				}
				throw new OracleNullValueException();
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.OperatorFloat, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.OperatorFloat);
				}
			}
		}

		public static explicit operator double(OracleDecimal value1)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.OperatorDouble);
			}
			try
			{
				if (value1.m_bNotNull)
				{
					return OracleNumberCore.lnxnur(value1.m_byteRepresentation);
				}
				throw new OracleNullValueException();
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.OperatorDouble, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.OperatorDouble);
				}
			}
		}

		public static explicit operator decimal(OracleDecimal value1)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.OperatorDecimal);
			}
			try
			{
				if (value1.m_bNotNull)
				{
					if (value1.m_numberType != 5 && value1.m_numberType != 4 && value1.m_numberType != 3)
					{
						return DecimalConv.GetDecimal(value1.m_byteRepresentation, 0, value1.m_byteRepresentation.Length);
					}
					throw new OverflowException();
				}
				throw new OracleNullValueException();
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.OperatorDecimal, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.OperatorDecimal);
				}
			}
		}

		public static explicit operator OracleDecimal(double value1)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.ctor);
			}
			try
			{
				return new OracleDecimal(value1);
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.ctor, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.ctor);
				}
			}
		}

		public static implicit operator OracleDecimal(int value1)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.ctor);
			}
			try
			{
				return new OracleDecimal(value1);
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.ctor, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.ctor);
				}
			}
		}

		public static implicit operator OracleDecimal(long value1)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.ctor);
			}
			try
			{
				return new OracleDecimal(value1);
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.ctor, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.ctor);
				}
			}
		}

		public static implicit operator OracleDecimal(decimal value1)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.ctor);
			}
			try
			{
				return new OracleDecimal(value1);
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.ctor, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.ctor);
				}
			}
		}

		public static OracleDecimal Abs(OracleDecimal value1)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Abs);
			}
			try
			{
				if (value1.m_bNotNull)
				{
					return new OracleDecimal(OracleNumberCore.lnxabs(value1.m_byteRepresentation), bContainsLength: false);
				}
				return Null;
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Abs, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Abs);
				}
			}
		}

		public static OracleDecimal Add(OracleDecimal value1, OracleDecimal value2)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Add);
			}
			try
			{
				if (value1.m_bNotNull && value2.m_bNotNull)
				{
					if (value1.m_numberType != 5 && value2.m_numberType != 5)
					{
						return new OracleDecimal(OracleNumberCore.lnxadd(value1.m_byteRepresentation, value2.m_byteRepresentation), bContainsLength: false);
					}
					return NaN;
				}
				return InternalTypes.CompareNull(!value1.m_bNotNull, !value2.m_bNotNull) switch
				{
					CompareNullEnum.BothNull => Null, 
					CompareNullEnum.FirstNullOnly => new OracleDecimal(value2.m_byteRepresentation, bContainsLength: false), 
					_ => new OracleDecimal(value1.m_byteRepresentation, bContainsLength: false), 
				};
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Add, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Add);
				}
			}
		}

		public static OracleDecimal AdjustScale(OracleDecimal value1, int digits, bool fRound)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.AdjustScale);
			}
			try
			{
				if (fRound)
				{
					return Round(value1, digits);
				}
				return Truncate(value1, digits);
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.AdjustScale, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.AdjustScale);
				}
			}
		}

		public static OracleDecimal Ceiling(OracleDecimal value1)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Ceiling);
			}
			try
			{
				if (value1.m_bNotNull)
				{
					return new OracleDecimal(OracleNumberCore.lnxceil(value1.m_byteRepresentation), bContainsLength: false);
				}
				return Null;
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Ceiling, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Ceiling);
				}
			}
		}

		public static OracleDecimal ConvertToPrecScale(OracleDecimal value1, int precision, int scale)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.ConvertToPrecScale);
			}
			try
			{
				if (value1.m_bNotNull)
				{
					if (value1.m_numberType != 5 && value1.m_numberType != 4 && value1.m_numberType != 3)
					{
						if (scale > MaxScale || scale < MinScale)
						{
							throw new OracleTypeException(ResourceStringConstants.TYP_ERR_INVALID_SCALE);
						}
						if (precision > MaxPrecision || precision < 1)
						{
							throw new OracleTypeException(ResourceStringConstants.TYP_ERR_INVALID_PREC);
						}
						OracleDecimal result = Round(value1, scale);
						string text = result.ToString().TrimStart('-');
						text = text.TrimStart('0', '.');
						text = text.TrimEnd('0');
						int num = 1;
						if (text.IndexOf(".") < 0)
						{
							num = 0;
						}
						if (precision + num >= text.Length)
						{
							return result;
						}
						throw new OracleTruncateException();
					}
					if (value1.m_numberType == 4)
					{
						return NegativeInfinity;
					}
					if (value1.m_numberType == 3)
					{
						return PositiveInfinity;
					}
					return NaN;
				}
				return Null;
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.ConvertToPrecScale, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.ConvertToPrecScale);
				}
			}
		}

		public static OracleDecimal Divide(OracleDecimal value1, OracleDecimal value2)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Divide);
			}
			try
			{
				if (value1.m_bNotNull && value2.m_bNotNull)
				{
					if (value1.m_bZero && value2.m_bZero)
					{
						return NaN;
					}
					if (value1.IsInfinity && value2.IsInfinity)
					{
						return NaN;
					}
					if (value1.m_numberType != 5 && value2.m_numberType != 5)
					{
						return new OracleDecimal(OracleNumberCore.lnxdiv(value1.m_byteRepresentation, value2.m_byteRepresentation), bContainsLength: false);
					}
					return NaN;
				}
				return Null;
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Divide, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Divide);
				}
			}
		}

		public static OracleDecimal Floor(OracleDecimal value1)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Floor);
			}
			try
			{
				if (value1.m_bNotNull)
				{
					return new OracleDecimal(OracleNumberCore.lnxflo(value1.m_byteRepresentation), bContainsLength: false);
				}
				return Null;
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Floor, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Floor);
				}
			}
		}

		public static OracleDecimal Mod(OracleDecimal value1, OracleDecimal value2)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Mod);
			}
			try
			{
				if (value1.m_bNotNull && value2.m_bNotNull)
				{
					if (value1.m_numberType != 5 && value2.m_numberType != 5)
					{
						return new OracleDecimal(OracleNumberCore.lnxmod(value1.m_byteRepresentation, value2.m_byteRepresentation), bContainsLength: false);
					}
					return NaN;
				}
				return Null;
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Mod, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Mod);
				}
			}
		}

		public static OracleDecimal Multiply(OracleDecimal value1, OracleDecimal value2)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Multiply);
			}
			try
			{
				if (value1.m_bNotNull && value2.m_bNotNull)
				{
					if ((value1.IsInfinity && value2.m_bZero) || (value1.m_bZero && value2.IsInfinity))
					{
						return NaN;
					}
					if (value1.m_numberType != 5 && value2.m_numberType != 5)
					{
						return new OracleDecimal(OracleNumberCore.lnxmul(value1.m_byteRepresentation, value2.m_byteRepresentation), bContainsLength: false);
					}
					return NaN;
				}
				return Null;
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Multiply, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Multiply);
				}
			}
		}

		public static OracleDecimal Negate(OracleDecimal value1)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Negate);
			}
			try
			{
				if (value1.m_bNotNull)
				{
					if (value1.m_numberType != 5)
					{
						return new OracleDecimal(OracleNumberCore.lnxneg(value1.m_byteRepresentation), bContainsLength: false);
					}
					return NaN;
				}
				return Null;
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Negate, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Negate);
				}
			}
		}

		public static OracleDecimal Parse(string numStr)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Parse);
			}
			try
			{
				return new OracleDecimal(numStr);
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Parse, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Parse);
				}
			}
		}

		public static OracleDecimal SetPrecision(OracleDecimal value1, int precision)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.SetPrecision);
			}
			try
			{
				if (value1.m_bNotNull)
				{
					if (value1.m_numberType != 5)
					{
						if (precision > MaxPrecision || precision < 1)
						{
							throw new OracleTypeException(ResourceStringConstants.TYP_ERR_INVALID_PREC);
						}
						return new OracleDecimal(OracleNumberCore.lnxrou(OracleNumberCore.lnxfpr(value1.m_byteRepresentation, precision), precision), bContainsLength: false);
					}
					return NaN;
				}
				return Null;
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.SetPrecision, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.SetPrecision);
				}
			}
		}

		internal static OracleDecimal SetPrecisionNoRound(OracleDecimal value1, int precision)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.SetPrecisionNoRound);
			}
			try
			{
				if (value1.m_bNotNull)
				{
					if (value1.m_numberType != 5)
					{
						if (precision > MaxPrecision || precision < 1)
						{
							throw new OracleTypeException(ResourceStringConstants.TYP_ERR_INVALID_PREC);
						}
						return new OracleDecimal(OracleNumberCore.lnxfpr(value1.m_byteRepresentation, precision), bContainsLength: false);
					}
					return NaN;
				}
				return Null;
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.SetPrecisionNoRound, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.SetPrecisionNoRound);
				}
			}
		}

		public static OracleDecimal Round(OracleDecimal value1, int decplace)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Round);
			}
			try
			{
				if (value1.m_bNotNull)
				{
					return new OracleDecimal(OracleNumberCore.lnxrou(value1.m_byteRepresentation, decplace), bContainsLength: false);
				}
				return Null;
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Round, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Round);
				}
			}
		}

		public static OracleDecimal Shift(OracleDecimal value1, int decplace)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Shift);
			}
			try
			{
				if (value1.m_bNotNull)
				{
					if (value1.m_numberType != 5)
					{
						return new OracleDecimal(OracleNumberCore.lnxshift(value1.m_byteRepresentation, decplace), bContainsLength: false);
					}
					return NaN;
				}
				return Null;
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Shift, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Shift);
				}
			}
		}

		public static int Sign(OracleDecimal value1)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Sign);
			}
			try
			{
				if (value1.m_bNotNull)
				{
					if (OracleNumberCore.IsZero(value1.m_byteRepresentation))
					{
						return 0;
					}
					return OracleNumberCore.IsPositive(value1.m_byteRepresentation) ? 1 : (-1);
				}
				throw new OracleNullValueException();
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Sign, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Sign);
				}
			}
		}

		public static OracleDecimal Sqrt(OracleDecimal value1)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Sqrt);
			}
			try
			{
				if (value1.m_bNotNull)
				{
					if (value1.m_numberType != 5 && value1.m_numberType != 4 && value1.m_numberType != 3)
					{
						if (!value1.m_bPositive && !value1.m_bZero)
						{
							throw new ArgumentOutOfRangeException("value1");
						}
						return new OracleDecimal(OracleNumberCore.lnxsqr(value1.m_byteRepresentation), bContainsLength: false);
					}
					return NaN;
				}
				return Null;
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Sqrt, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Sqrt);
				}
			}
		}

		public static OracleDecimal Subtract(OracleDecimal value1, OracleDecimal value2)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Subtract);
			}
			try
			{
				if (value1.m_bNotNull && value2.m_bNotNull)
				{
					if (value1.IsPositiveInfinity && value2.IsPositiveInfinity)
					{
						return NaN;
					}
					if (value1.m_numberType != 5 && value2.m_numberType != 5)
					{
						return new OracleDecimal(OracleNumberCore.lnxsub(value1.m_byteRepresentation, value2.m_byteRepresentation), bContainsLength: false);
					}
					return NaN;
				}
				return InternalTypes.CompareNull(!value1.m_bNotNull, !value2.m_bNotNull) switch
				{
					CompareNullEnum.BothNull => Null, 
					CompareNullEnum.FirstNullOnly => Negate(value2), 
					_ => new OracleDecimal(value1.m_byteRepresentation, bContainsLength: false), 
				};
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Subtract, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Subtract);
				}
			}
		}

		public static OracleDecimal Truncate(OracleDecimal value1, int position)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Truncate);
			}
			try
			{
				if (value1.m_bNotNull)
				{
					return new OracleDecimal(OracleNumberCore.lnxtru(value1.m_byteRepresentation, position), bContainsLength: false);
				}
				return Null;
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Truncate, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Truncate);
				}
			}
		}

		public static OracleDecimal Exp(OracleDecimal value1)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Exp);
			}
			try
			{
				if (value1.m_bNotNull)
				{
					if (value1.m_numberType != 5)
					{
						return new OracleDecimal(OracleNumberCore.lnxexp(value1.m_byteRepresentation), bContainsLength: false);
					}
					return NaN;
				}
				return Null;
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Exp, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Exp);
				}
			}
		}

		public static OracleDecimal Pow(OracleDecimal value1, int power)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Pow);
			}
			try
			{
				if (value1.m_bNotNull)
				{
					if (value1.m_numberType != 5)
					{
						return new OracleDecimal(OracleNumberCore.lnxpow(value1.m_byteRepresentation, power), bContainsLength: false);
					}
					return NaN;
				}
				return Null;
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Pow, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Pow);
				}
			}
		}

		public static OracleDecimal Pow(OracleDecimal value1, OracleDecimal power)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Pow);
			}
			try
			{
				if (value1.m_bNotNull && power.m_bNotNull)
				{
					if (value1.IsZero && !power.IsPositive && !power.IsZero)
					{
						return PositiveInfinity;
					}
					if (value1.m_numberType != 5 && power.m_numberType != 5)
					{
						return new OracleDecimal(OracleNumberCore.lnxbex(value1.m_byteRepresentation, power.m_byteRepresentation), bContainsLength: false);
					}
					return NaN;
				}
				return Null;
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Pow, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Pow);
				}
			}
		}

		public static OracleDecimal Log(OracleDecimal value1)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Log);
			}
			try
			{
				if (value1.m_bNotNull)
				{
					if (value1.m_numberType == 4 || value1.m_numberType == 5)
					{
						return NaN;
					}
					if (value1.m_numberType == 3)
					{
						return PositiveInfinity;
					}
					if (!value1.IsPositive && !value1.IsZero)
					{
						throw new ArgumentOutOfRangeException("value1");
					}
					return new OracleDecimal(OracleNumberCore.lnxln(value1.m_byteRepresentation), bContainsLength: false);
				}
				return Null;
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Log, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Log);
				}
			}
		}

		public static OracleDecimal Log(OracleDecimal value1, int logBase)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Log);
			}
			try
			{
				if (value1.m_bNotNull)
				{
					if (value1.m_numberType == 4 || value1.m_numberType == 5)
					{
						return NaN;
					}
					if (value1.m_numberType == 3)
					{
						return PositiveInfinity;
					}
					if (!value1.IsPositive && !value1.IsZero)
					{
						throw new ArgumentOutOfRangeException("value1");
					}
					if (logBase <= 0)
					{
						throw new ArgumentOutOfRangeException("logBase");
					}
					if (value1.IsZero && logBase == 0)
					{
						return NaN;
					}
					if (value1.IsPositive && logBase == 0)
					{
						return new OracleDecimal(0);
					}
					return new OracleDecimal(OracleNumberCore.lnxlog(b: ((OracleDecimal)logBase).m_byteRepresentation, n: value1.m_byteRepresentation), bContainsLength: false);
				}
				return Null;
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Log, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Log);
				}
			}
		}

		public static OracleDecimal Log(OracleDecimal value1, OracleDecimal logBase)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Log);
			}
			try
			{
				if (value1.m_bNotNull && logBase.m_bNotNull)
				{
					if (value1.m_numberType == 4 || value1.m_numberType == 5 || logBase.m_numberType == 4 || logBase.m_numberType == 5)
					{
						return NaN;
					}
					if (value1.m_numberType == 3)
					{
						return PositiveInfinity;
					}
					if (logBase.m_numberType == 3)
					{
						return Zero;
					}
					if (!value1.IsPositive && !value1.IsZero)
					{
						throw new ArgumentOutOfRangeException("value1");
					}
					if (!logBase.IsPositive && !logBase.IsZero)
					{
						throw new ArgumentOutOfRangeException("logBase");
					}
					if (value1.IsZero && logBase.IsZero)
					{
						return NaN;
					}
					if (value1.IsPositive && logBase.IsZero)
					{
						return new OracleDecimal(0);
					}
					return new OracleDecimal(OracleNumberCore.lnxlog(value1.m_byteRepresentation, logBase.m_byteRepresentation), bContainsLength: false);
				}
				return Null;
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Log, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Log);
				}
			}
		}

		public static OracleDecimal Acos(OracleDecimal value1)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Acos);
			}
			try
			{
				if (value1.m_bNotNull)
				{
					if (value1.m_numberType != 5 && value1.m_numberType != 4 && value1.m_numberType != 3)
					{
						return new OracleDecimal(OracleNumberCore.lnxacos(value1.m_byteRepresentation), bContainsLength: false);
					}
					return NaN;
				}
				return Null;
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Acos, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Acos);
				}
			}
		}

		public static OracleDecimal Asin(OracleDecimal value1)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Asin);
			}
			try
			{
				if (value1.m_bNotNull)
				{
					if (value1.m_numberType != 5 && value1.m_numberType != 4 && value1.m_numberType != 3)
					{
						return new OracleDecimal(OracleNumberCore.lnxasin(value1.m_byteRepresentation), bContainsLength: false);
					}
					return NaN;
				}
				return Null;
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Asin, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Asin);
				}
			}
		}

		public static OracleDecimal Atan(OracleDecimal value1)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Atan);
			}
			try
			{
				if (value1.m_bNotNull)
				{
					if (value1.m_numberType != 5)
					{
						return new OracleDecimal(OracleNumberCore.lnxatan(value1.m_byteRepresentation), bContainsLength: false);
					}
					return NaN;
				}
				return Null;
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Atan, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Atan);
				}
			}
		}

		public static OracleDecimal Atan2(OracleDecimal value1, OracleDecimal value2)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Atan2);
			}
			try
			{
				if (value1.m_bNotNull && value2.m_bNotNull)
				{
					if (value1.m_numberType == 5 || value2.m_numberType == 5)
					{
						return NaN;
					}
					return new OracleDecimal(OracleNumberCore.lnxatan2(value1.m_byteRepresentation, value2.m_byteRepresentation), bContainsLength: false);
				}
				return Null;
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Atan2, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Atan2);
				}
			}
		}

		public static OracleDecimal Cos(OracleDecimal value1)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Cos);
			}
			try
			{
				if (value1.m_bNotNull)
				{
					if (value1.m_numberType != 5 && value1.m_numberType != 4 && value1.m_numberType != 3)
					{
						return new OracleDecimal(OracleNumberCore.lnxcos(value1.m_byteRepresentation), bContainsLength: false);
					}
					return NaN;
				}
				return Null;
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Cos, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Cos);
				}
			}
		}

		public static OracleDecimal Sin(OracleDecimal value1)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Sin);
			}
			try
			{
				if (value1.m_bNotNull)
				{
					if (value1.m_numberType != 5 && value1.m_numberType != 4 && value1.m_numberType != 3)
					{
						return new OracleDecimal(OracleNumberCore.lnxsin(value1.m_byteRepresentation), bContainsLength: false);
					}
					return NaN;
				}
				return Null;
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Sin, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Sin);
				}
			}
		}

		public static OracleDecimal Tan(OracleDecimal value1)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Tan);
			}
			try
			{
				if (value1.m_bNotNull)
				{
					if (value1.m_numberType != 5 && value1.m_numberType != 4 && value1.m_numberType != 3)
					{
						return new OracleDecimal(OracleNumberCore.lnxtan(value1.m_byteRepresentation), bContainsLength: false);
					}
					return NaN;
				}
				return Null;
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Tan, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Tan);
				}
			}
		}

		public static OracleDecimal Cosh(OracleDecimal value1)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Cosh);
			}
			try
			{
				if (value1.m_bNotNull)
				{
					if (value1.m_numberType == 4 || value1.m_numberType == 3)
					{
						return PositiveInfinity;
					}
					if (value1.m_numberType == 5)
					{
						return NaN;
					}
					return new OracleDecimal(OracleNumberCore.lnxcsh(value1.m_byteRepresentation), bContainsLength: false);
				}
				return Null;
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Cosh, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Cosh);
				}
			}
		}

		public static OracleDecimal Sinh(OracleDecimal value1)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Sinh);
			}
			try
			{
				if (value1.m_bNotNull)
				{
					if (value1.m_numberType == 4)
					{
						return NegativeInfinity;
					}
					if (value1.m_numberType == 3)
					{
						return PositiveInfinity;
					}
					if (value1.m_numberType == 5)
					{
						return NaN;
					}
					return new OracleDecimal(OracleNumberCore.lnxsnh(value1.m_byteRepresentation), bContainsLength: false);
				}
				return Null;
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Sinh, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Sinh);
				}
			}
		}

		public static OracleDecimal Tanh(OracleDecimal value1)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Tanh);
			}
			try
			{
				if (value1.m_bNotNull)
				{
					if (value1.m_numberType == 5)
					{
						return NaN;
					}
					if (value1.IsPositiveInfinity)
					{
						return new OracleDecimal(1);
					}
					if (value1.IsNegativeInfinity)
					{
						return new OracleDecimal(-1);
					}
					return new OracleDecimal(OracleNumberCore.lnxtnh(value1.m_byteRepresentation), bContainsLength: false);
				}
				return Null;
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Tanh, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Tanh);
				}
			}
		}

		public byte ToByte()
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.ToByte);
			}
			try
			{
				if (m_bNotNull)
				{
					if (m_numberType != 5 && m_numberType != 4 && m_numberType != 3)
					{
						return Convert.ToByte(OracleNumberCore.lnxsni(m_byteRepresentation));
					}
					throw new OverflowException();
				}
				throw new OracleNullValueException();
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.ToByte, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.ToByte);
				}
			}
		}

		public short ToInt16()
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.ToInt16);
			}
			try
			{
				if (m_bNotNull)
				{
					if (m_numberType != 5 && m_numberType != 4 && m_numberType != 3)
					{
						return Convert.ToInt16(OracleNumberCore.lnxsni(m_byteRepresentation));
					}
					throw new OverflowException();
				}
				throw new OracleNullValueException();
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.ToInt16, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.ToInt16);
				}
			}
		}

		public int ToInt32()
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.ToInt32);
			}
			try
			{
				if (m_bNotNull)
				{
					if (m_numberType != 5 && m_numberType != 4 && m_numberType != 3)
					{
						return Convert.ToInt32(OracleNumberCore.lnxsni(m_byteRepresentation));
					}
					throw new OverflowException();
				}
				throw new OracleNullValueException();
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.ToInt32, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.ToInt32);
				}
			}
		}

		public long ToInt64()
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.ToInt64);
			}
			try
			{
				if (m_bNotNull)
				{
					if (m_numberType != 5 && m_numberType != 4 && m_numberType != 3)
					{
						return OracleNumberCore.lnxsni(m_byteRepresentation);
					}
					throw new OverflowException();
				}
				throw new OracleNullValueException();
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.ToInt64, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.ToInt64);
				}
			}
		}

		public float ToSingle()
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.ToSingle);
			}
			try
			{
				if (m_bNotNull)
				{
					return Convert.ToSingle(OracleNumberCore.lnxnur(m_byteRepresentation));
				}
				throw new OracleNullValueException();
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.ToSingle, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.ToSingle);
				}
			}
		}

		public double ToDouble()
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.ToDouble);
			}
			try
			{
				if (m_bNotNull)
				{
					return OracleNumberCore.lnxnur(m_byteRepresentation);
				}
				throw new OracleNullValueException();
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.ToDouble, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.ToDouble);
				}
			}
		}

		public int CompareTo(object obj)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.CompareTo);
			}
			try
			{
				if (obj == null)
				{
					throw new ArgumentNullException("obj");
				}
				if (obj.GetType() != typeof(OracleDecimal))
				{
					throw new ArgumentException("obj");
				}
				return Compare(this, (OracleDecimal)obj);
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.CompareTo, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.CompareTo);
				}
			}
		}

		public override bool Equals(object obj)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Equals);
			}
			try
			{
				if (obj == null || obj.GetType() != typeof(OracleDecimal))
				{
					return false;
				}
				return CompareTo(obj) == 0;
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Equals, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Equals);
				}
			}
		}

		public override int GetHashCode()
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.GetHashCode);
			}
			try
			{
				if (m_bNotNull)
				{
					return m_byteRepresentation.GetHashCode();
				}
				return 0;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.GetHashCode);
				}
			}
		}

		public override string ToString()
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.ToString);
			}
			try
			{
				if (m_bNotNull)
				{
					if (IsPositiveInfinity)
					{
						return "~";
					}
					if (IsNegativeInfinity)
					{
						return "-~";
					}
					if (IsZero)
					{
						return "0";
					}
					if (m_numberType == 5)
					{
						return "NaN";
					}
					return DecimalConv.ToString(m_byteRepresentation);
				}
				return "null";
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.ToString, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.ToString);
				}
			}
		}

		internal static OracleDecimal SetPi()
		{
			if (ProviderConfig.m_bTraceLevelPrivate)
			{
				Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Entry, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.SetPi);
			}
			try
			{
				return new OracleDecimal(OracleNumberCore.PI, bContainsLength: false);
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Private, OracleTraceTag.Error, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.SetPi, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPrivate)
				{
					Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Exit, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.SetPi);
				}
			}
		}

		internal static OracleDecimal GetMaxValue()
		{
			return new OracleDecimal(new byte[20]
			{
				255,
				100,
				100,
				100,
				100,
				100,
				100,
				100,
				100,
				100,
				100,
				100,
				100,
				100,
				100,
				100,
				100,
				100,
				100,
				100
			}, bContainsLength: false);
		}

		internal static OracleDecimal GetMinValue()
		{
			return new OracleDecimal(new byte[21]
			{
				0,
				2,
				2,
				2,
				2,
				2,
				2,
				2,
				2,
				2,
				2,
				2,
				2,
				2,
				2,
				2,
				2,
				2,
				2,
				2,
				102
			}, bContainsLength: false);
		}

		internal static OracleDecimal GetPosInfinity()
		{
			if (ProviderConfig.m_bTraceLevelPrivate)
			{
				Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Entry, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.GetPosInfinity);
			}
			try
			{
				return new OracleDecimal(OracleNumberCore.GetPositiveInfinityByteRep(), bContainsLength: false);
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Private, OracleTraceTag.Error, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.GetPosInfinity, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPrivate)
				{
					Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Exit, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.GetPosInfinity);
				}
			}
		}

		internal static OracleDecimal GetNegInfinity()
		{
			if (ProviderConfig.m_bTraceLevelPrivate)
			{
				Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Entry, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.GetNegInfinity);
			}
			try
			{
				return new OracleDecimal(OracleNumberCore.GetNegativeInfinityByteRep(), bContainsLength: false);
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Private, OracleTraceTag.Error, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.GetNegInfinity, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPrivate)
				{
					Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Exit, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.GetNegInfinity);
				}
			}
		}

		internal static OracleDecimal GetNaN()
		{
			if (ProviderConfig.m_bTraceLevelPrivate)
			{
				Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Entry, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.GetNaN);
			}
			try
			{
				return new OracleDecimal(OracleNumberCore.NANREPD, bContainsLength: false);
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Private, OracleTraceTag.Error, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.GetNaN, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPrivate)
				{
					Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Exit, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.GetNaN);
				}
			}
		}

		internal static int Compare(OracleDecimal value1, OracleDecimal value2)
		{
			if (ProviderConfig.m_bTraceLevelPrivate)
			{
				Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Entry, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Compare);
			}
			try
			{
				return InternalTypes.CompareNull(!value1.m_bNotNull, !value2.m_bNotNull) switch
				{
					CompareNullEnum.BothNull => 0, 
					CompareNullEnum.FirstNullOnly => -1, 
					CompareNullEnum.SecondNullOnly => 1, 
					_ => OracleNumberCore.compareBytes(value1.m_byteRepresentation, value2.m_byteRepresentation), 
				};
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Private, OracleTraceTag.Error, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Compare, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPrivate)
				{
					Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Exit, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.Compare);
				}
			}
		}

		internal static void ToBytes(string numStr, out byte[] decimalByteRep, out int numberType, out bool bPositive, out bool bZero)
		{
			if (ProviderConfig.m_bTraceLevelPrivate)
			{
				Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Entry, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.ToBytes);
			}
			try
			{
				if (numStr == null)
				{
					throw new ArgumentNullException();
				}
				if (numStr == "~" || string.Compare(numStr, "Inf", StringComparison.InvariantCultureIgnoreCase) == 0 || string.Compare(numStr, "+Inf", StringComparison.InvariantCultureIgnoreCase) == 0 || string.Compare(numStr, "Infinity", StringComparison.InvariantCultureIgnoreCase) == 0 || numStr == "∞")
				{
					decimalByteRep = OracleNumberCore.GetPositiveInfinityByteRep();
					numberType = 3;
					bPositive = true;
					bZero = false;
					return;
				}
				if (numStr == "-~" || string.Compare(numStr, "-Inf", StringComparison.InvariantCultureIgnoreCase) == 0 || string.Compare(numStr, "-Infinity", StringComparison.InvariantCultureIgnoreCase) == 0 || numStr == "-∞")
				{
					decimalByteRep = OracleNumberCore.GetNegativeInfinityByteRep();
					numberType = 4;
					bPositive = false;
					bZero = false;
					return;
				}
				if (string.Compare(numStr, "NaN", StringComparison.InvariantCultureIgnoreCase) == 0)
				{
					decimalByteRep = OracleNumberCore.NANREPD;
					numberType = 5;
					bPositive = true;
					bZero = false;
					return;
				}
				decimalByteRep = DecimalConv.FromString(numStr, out bPositive, out bZero, out var _, out var hasDecimalPoint);
				if (decimalByteRep == null)
				{
					throw new FormatException();
				}
				numberType = ((!hasDecimalPoint) ? 1 : 2);
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Private, OracleTraceTag.Error, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.ToBytes, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPrivate)
				{
					Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Exit, OracleTraceClassName.OracleDecimal, OracleTraceFuncName.ToBytes);
				}
			}
		}
	}
}
